<?php
/**
 * Created by PhpStorm.
 * User: 不死鸟1988
 * Date: 2019/5/27
 * Time: 15:13
 */
namespace app\blog\controller;
use  cmf\controller\HomeBaseController;
use think\cache\driver\Redis;
use think\Route;

class IndexController extends  HomeBaseController
{
    public function index(){
        $page = 123;
        $this->assign('page',$page);
        return $this->fetch('index');
    }

    public function login(){
        $redis = new Redis();
        $page = 123;
        $this->assign('page',$page);
        return $this->fetch('login');
    }

    public function submit(){
        $accout = trim($_POST['accout']);
        $password = trim($_POST['password']);

        if (empty($accout) || empty($password)){
            $this->error('用户名不能为空！');
        }
        $this->success( '登录成功！');
    }


}